package micro86.engine.utest;

/**
 * (c) Kate Luzhevskaya 2013
 */
public class ProcessorTest {
  /*
    @Test
    public void performActionFromLineTest() throws Exception{
        String line1 = "MOV AX 5";
        String line2 = "MOV CX 8";
        String line3 = "MOV AX CX";
        String line4 = "MOV BX -128";
        String line5 = "ADD AX BX";
        String line6 = "MUL AX BX";
        String line7 = "DIV AV BX";
        String line8 = "MOV BX -128";
        String line9 = "SUB AX BX";
        String line10 = "MOV AX AX";
        String line11 = "MOV BX 5";

        State state = new State();
        Parser parser = new Parser();
        Processor processor = new Processor(state,);

        forth.performActionFromLine(line1);
        Assert.assertTrue(State.numberA == 5);

        forth.performActionFromLine(line2);
        forth.performActionFromLine(line3);
        Assert.assertTrue(State.numberA == 8);

        forth.performActionFromLine(line4);
        forth.performActionFromLine(line5);
        Assert.assertTrue(State.numberA == -120);
        Assert.assertFalse(State.sf);
        Assert.assertFalse(State.zf);

        forth.performActionFromLine(line6);
        Assert.assertTrue(State.numberA == 0);
        Assert.assertTrue(State.sf);
        Assert.assertTrue(State.zf);

        forth.performActionFromLine(line7);
        Assert.assertTrue(State.numberA == 0);
        Assert.assertTrue(State.numberB == 0);

        try {
            forth.performActionFromLine(line7);
        } catch (ForthException e) {
            System.out.print("\nError happened: " + e);
        }

        forth.performActionFromLine(line8);
        forth.performActionFromLine(line9);
        Assert.assertTrue(State.numberA == -128);

        forth.performActionFromLine(line10);
        Assert.assertTrue(State.numberA == -128);

        forth.performActionFromLine(line11);
        forth.performActionFromLine(line9);
        Assert.assertTrue(State.numberA == 123);
        Assert.assertTrue(State.sf);
        Assert.assertFalse(State.zf);

        forth.performActionFromLine(line7);
        Assert.assertTrue(State.numberA == 24);
        Assert.assertTrue(State.numberB == 3);

    }
   */
}
